<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>

<div id="menu">
	<logic:notPresent name="userName" scope="session">
		<logic:redirect forward="login"></logic:redirect>
	</logic:notPresent>
	<logic:notEqual name="userName" scope="session" value="admin">
		<table>
			<tr>
				<td>
					<html:link forward="viewProject">查看项目</html:link>
				</td>
			</tr>
			<tr>
				<td>
					<html:link forward="viewMessage">查看消息</html:link>
				</td>
			</tr>
			<tr>
				<td>
					<html:link forward="viewWork">工作记录</html:link>
				</td>
			</tr>
			<tr>
				<td>
					<html:link forward="logoff">退出登录</html:link>
				</td>
			</tr>
		</table>
	</logic:notEqual>
	<logic:equal name="userName" scope="session" value="admin">
		<table>
			<tr>
				<td>
					<html:link forward="addUser">添加用户</html:link>
				</td>
			</tr>
			<tr>
				<td>
					<html:link forward="viewUser">管理用户</html:link>
				</td>
			</tr>
			<tr>
				<td>
					<html:link forward="addProject">添加项目</html:link>
				</td>
			</tr>
			<tr>
				<td>
					<html:link forward="viewProject">管理项目</html:link>
				</td>
			</tr>
			<tr>
				<td>
					<html:link forward="sendMessage">发送消息</html:link>
				</td>
			</tr>
			<tr>
				<td>
					<html:link forward="viewMessage">管理消息</html:link>
				</td>
			</tr>
			<tr>
				<td>
					<html:link forward="viewWork">工作记录</html:link>
				</td>
			</tr>
			<tr>
				<td>
					<html:link forward="changePassword">修改密码</html:link>
				</td>
			</tr>
			<tr>
				<td>
					<html:link forward="logoff">退出登录</html:link>
				</td>
			</tr>
		</table>
	</logic:equal>
</div>
